#ifndef TENCENTEDITACCOUNT_H
#define TENCENTEDITACCOUNT_H

#include <choqok/editaccountwidget.h>
#include "ui_tencenteditaccount_base.h"

class TencentAccount;
class TencentMicroBlog;

class TencentEditAccountWidget : public ChoqokEditAccountWidget, public Ui::TencentEditAccountBase
{
    Q_OBJECT
    public:
        explicit TencentEditAccountWidget( TencentMicroBlog* microblog, TencentAccount* account, QWidget* parent );
        virtual ~TencentEditAccountWidget();
        virtual bool validateData();
        virtual Choqok::Account* apply();
    protected Q_SLOTS:
        virtual void authorizeUser();
    private:
        void getPinCode();
        void setAuthenticated( bool authenticated );
    private:
        QByteArray token;
        QByteArray tokenSecret;
        QString username;
        bool isAuthenticated;
};

#endif // TENCENTEDITACCOUNT_H
